/**
 * *******************************************
 * user: zmq
 * describe: areaRemote模块  用于处理area的RCP调用
 * created:
 * date: 2021/8/18
 * *******************************************
 */

import {Application} from 'pinus';
import areaService from "../../../service/areaService";


export default function (app: Application) {
    return new AreaRemote(app);
}

export class AreaRemote {

    /**
     * 构造函数
     */
    constructor(private app: Application) {
        this.app = app;
    }

    /*********************** 用户Remote ******************************/


    /**
     * 玩家创建角色
     * @param msg
     * @returns {Promise<any>}
     */
    public async createRole(msg: any): Promise<any> {

        // 返回创建角色数据
        return areaService.createRole(msg);
    }

    /**
     * 玩家登录 - 初始化处理
     * @param msg
     * @returns {Promise<any>}
     */
    public async login(msg: any) {

        // 返回登录数据
        return areaService.login(msg);
    }

}
